{extend name="public/common"} {block name="body"}
<title>基本设置</title>
</head>
<body>
	<nav class="breadcrumb">
		<i class="Hui-iconfont">&#xe67f;</i>
		首页
		<span class="c-gray en">&gt;</span>
		 财务管理
		<span class="c-gray en">&gt;</span>
		微信支付方案修改
		<a class="btn btn-success radius r"
			style="line-height: 1.6em; margin-top: 3px"
			href="javascript:location.replace(location.href);" title="刷新">
			<i class="Hui-iconfont">&#xe68f;</i>
		</a>
	</nav>

	<article class="page-container">
		<form class="form form-horizontal" action="" enctype="multipart/form-data" id="form-admin-add" method="post">
		<div class="row cl">
						<label class="form-label col-xs-4 col-sm-2">
							<span class="c-red">*</span>
							方案名称：
						</label>
						<div class="formControls col-xs-8 col-sm-9">
							<input type="text" name="payname" id="website_title" value="" style="width:60%;" class="input-text">
						</div>
					</div>
		<div class="row cl">
				<label class="form-label col-xs-4 col-sm-2">会员等级选择：</label>
				<div class="formControls col-xs-8 col-sm-9">
				
				{foreach ($us_class as $value)}
					<input class="lv_id" type="checkbox" name="usclass[]" value="{$value.id}" style=""><span style="margin-right:20px;">{$value.class_name}</span>
				{/foreach}
				</div>
			</div>

			<div class="row cl">
				<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
					<button class="btn btn-primary radius" type="submit">
						<i class="Hui-iconfont">&#xe632;</i>
						保存
					</button>
					<div class="btn btn-primary radius" onclick="javascript:history.back(-1);">
						<i class="Hui-iconfont">&#xe632;</i>
						返回
					</div>
				</div>
				
			</div>
		</form>
	</article>

	{/block}
{block name="js"}
<script type="text/javascript" src="__SYSMET__/common.js"></script>
<script type="text/javascript" src="__SYSMET__/lib/jquery.validation/1.14.0/jquery.validate.js"></script> 
<script type="text/javascript" src="__SYSMET__/lib/jquery.validation/1.14.0/validate-methods.js"></script>
<script type="text/javascript" src="__SYSMET__/lib/jquery.validation/1.14.0/messages_zh.js"></script>
<script type="text/javascript">
	//表单验证
	$("#form-admin-add").submit(function(){
		var lv_id = $('input[class=lv_id]:checked').length;
		var title = $("#website_title").val();
		if(title == ''){
			layer.msg('请输入名称', {icon: 5});
			return false;
		}
		if(lv_id == 0){
			layer.msg('请选择等级', {icon: 5});
			return false;
		}
	})
</script>
{/block}
